#include "widget.h"
#include "ui_widget.h"


Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
//    QPushButton *pushButton = new QPushButton("Click me", this);
//    pushButton->setGeometry(50, 50, 100, 50);

//    QPropertyAnimation *animation = new QPropertyAnimation(pushButton, "pos");

    QPropertyAnimation *animation = new QPropertyAnimation(ui->btn, "pos");
    animation->setStartValue(QPoint(50,50)); // 设置起始位置为(50,50)
    animation->setEndValue(QPoint(200, 200)); // 设置结束位置为(200,50)，即向右平移150像素
    animation->setDuration(10000); // 设置动画持续时间为1秒
    animation->start(); // 启动动画


    my_digitalScroller = new DigitalScroller(this);
    connect(my_digitalScroller,SIGNAL(currentValueChanged(int)),this,SLOT(slot_temp_value_channged(int)));
    my_digitalScroller->move(275,100);
//    my_digitalScroller->hide();

}

Widget::~Widget()
{
    delete ui;
}

void Widget::slot_temp_value_channged(int num)
{
    qDebug() << "num:" << num;
}

void Widget::on_pushButton_pressed()
{

}


void Widget::on_pushButton_released()
{

}

